-
Notifications
You must be signed in to change notification settings - Fork 7
refactor(inkless): return LogConfig from MetadataView#getTopicConfig #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jeqo/refactor-shared-state
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the MetadataView#getTopicConfig method to return LogConfig instead of Properties, consolidating configuration merging logic into the MetadataView implementation. This simplifies callers by removing redundant LogConfig.fromProps() calls and eliminates the need to separately access default configurations.
Key changes:
- Interface change in
MetadataViewto returnLogConfiginstead ofProperties - Implementation in
InklessMetadataViewnow merges default and topic-specific configs internally - Simplified caller code in
AppendHandlerandRetentionEnforcer
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| storage/inkless/src/main/java/io/aiven/inkless/control_plane/MetadataView.java | Updated interface method signature to return LogConfig instead of Properties |
| core/src/main/scala/kafka/server/metadata/InklessMetadataView.scala | Implemented getTopicConfig to merge default configs with topic overrides using LogConfig.fromProps |
| storage/inkless/src/main/java/io/aiven/inkless/produce/AppendHandler.java | Simplified getLogConfigs method by removing LogConfig.fromProps call and refactored constructor to accept Function<String, LogConfig> |
| storage/inkless/src/main/java/io/aiven/inkless/delete/RetentionEnforcer.java | Replaced LogConfig.fromProps call with direct method reference to getTopicConfig |
| storage/inkless/src/test/java/io/aiven/inkless/produce/AppendHandlerTest.java | Simplified test setup by removing SharedState and related mock dependencies |
| storage/inkless/src/test/java/io/aiven/inkless/delete/RetentionEnforcerTest.java | Updated mocks to return LogConfig instead of Properties and added try-with-resources for proper cleanup |
| storage/inkless/src/test/java/io/aiven/inkless/merge/FileMergerIntegrationTest.java | Simplified mock setup to return LogConfig directly |
| storage/inkless/src/test/java/io/aiven/inkless/delete/FileCleanerIntegrationTest.java | Simplified mock setup to return LogConfig directly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Change MetadataView#getTopicConfig to return LogConfig instead of Properties, consolidating the responsibility of merging default and topic-specific configurations into the MetadataView implementation. This simplifies callers by: - Removing redundant LogConfig.fromProps() calls in RetentionEnforcer and AppendHandler - Eliminating the need for callers to access default configs separately - Reducing test setup by removing mock configuration for default configs The InklessMetadataView now handles merging default configs with topic overrides internally, providing a fully-resolved LogConfig to consumers.
1dce5f5 to
6e7b51f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Change MetadataView#getTopicConfig to return LogConfig instead of Properties, consolidating the responsibility of merging default and topic-specific configurations into the MetadataView implementation.
This simplifies callers by:
The InklessMetadataView now handles merging default configs with topic overrides internally, providing a fully-resolved LogConfig to consumers.